/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kmcsoft.goldshop.model.master;

import com.kmcsoft.emaster.entity.Employee;
import javax.jdo.annotations.Column;
import javax.jdo.annotations.FetchGroup;
import javax.jdo.annotations.FetchGroups;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

/**
 *
 * @author kmcsoft02
 */
@PersistenceCapable(detachable = "true", table = "SHOP_product")
@FetchGroups(value = {
    @FetchGroup(name = "detach_ProductPremiumJewelry_All", members = {
        @Persistent(name = "unit"),
        @Persistent(name = "jewelryType"),
        @Persistent(name = "style"),
        @Persistent(name = "costCurrency"),
        @Persistent(name = "currency"),
        @Persistent(name = "labeledEmployee"),
        @Persistent(name = "person"),
        @Persistent(name = "diamond"),
        @Persistent(name = "statusHistoryProducts"),
        @Persistent(name = "importJewelryDetail")}),
    @FetchGroup(name = "detach_ProductPremiumJewelry_JewelryStyle", members = {
        @Persistent(name = "style")}),
    @FetchGroup(name = "detach_ProductPremiumJewelry_PremiumJewelryType", members = {
        @Persistent(name = "jewelryType")}),
    @FetchGroup(name = "detach_ProductPremiumJewelry_Employee", members = {
        @Persistent(name = "labeledEmployee")}),
    @FetchGroup(name = "detach_ProductPremiumJewelry_PricingPerson", members = {
        @Persistent(name = "person")}),
    @FetchGroup(name = "detach_ProductPremiumJewelry_ProductDiamond", members = {
        @Persistent(name = "diamond")})
})
public class ProductPremiumJewelry extends Product {

    @Persistent
    private PremiumJewelryType jewelryType;
    @Persistent
    private Employee labeledEmployee;
    @Persistent
    @Column(defaultValue = "0")
    private double jewelryWeight;
    @Persistent
    @Column(defaultValue = "0")
    private double unitCostPrice;//gia von
    @Persistent
    @Column(defaultValue = "0")
    private double sellingPrice;
    @Persistent
    private String madeFrom;
    @Persistent
    private ProductDiamond diamond;

    public PremiumJewelryType getJewelryType() {
        return jewelryType;
    }

    public void setJewelryType(PremiumJewelryType jewelryType) {
        this.jewelryType = jewelryType;
    }

    public Employee getLabeledEmployee() {
        return labeledEmployee;
    }

    public void setLabeledEmployee(Employee labeledEmployee) {
        this.labeledEmployee = labeledEmployee;
    }

    public double getUnitCostPrice() {
        return unitCostPrice;
    }

    public void setUnitCostPrice(double unitCostPrice) {
        this.unitCostPrice = unitCostPrice;
    }

    public double getSellingPrice() {
        return sellingPrice;
    }

    public void setSellingPrice(double sellingPrice) {
        this.sellingPrice = sellingPrice;
    }

    public String getMadeFrom() {
        return madeFrom;
    }

    public void setMadeFrom(String madeFrom) {
        this.madeFrom = madeFrom;
    }

    public ProductDiamond getDiamond() {
        return diamond;
    }

    public void setDiamond(ProductDiamond diamond) {
        this.diamond = diamond;
    }

    public double getJewelryWeight() {
        return jewelryWeight;
    }

    public void setJewelryWeight(double jewelryWeight) {
        this.jewelryWeight = jewelryWeight;
    }
}
